package com.buaa.airticketbookingsystem.Service.UserServiceImpl;

import com.buaa.airticketbookingsystem.Dao.TicketDao;
import com.buaa.airticketbookingsystem.Entity.Ticket;
import com.buaa.airticketbookingsystem.Service.TicketService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

@Service
public class TicketServiceImpl implements TicketService {

    @Autowired
    private TicketDao ticketDao;

    @Override
    public void addNewTicket(Ticket ticket) {
        ticketDao.addNewTicket(ticket);
    }

    @Override
    public Ticket getTicketById(String t_id){
        return ticketDao.getTicketById(t_id);
    }

    @Override
    public void add(String t_id){
        ticketDao.add(t_id);
    }
}
